<include file="Public:header" />
<section role="main" class="content-body">
    <header class="page-header"></header>
    <!-- start: page -->
    <section class="panel">
        <header class="panel-heading">
            <h1>挂卖{$currency['name']}</h1>
            <small>请确定把自己的联络方式（电话号码），以及银行资料都填好，以方便买家联络您</small></header>
    </section>
    <fieldset>
        <section class="panel">
            <div class="panel-body">
                <form class="form-horizontal form-bordered" id="form" autocomplete="off">
                    <div class="form-group">
                        <label class="col-md-2 control-label" for="cname">最高可卖数量</label>
                        <div class="col-md-6">
                            <input class="form-control has-value" disabled="" name="max_volume" id="max_volume" type="text" value="{$info[$currency['id']]['num']}"></div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-8">
                            <label>
                                <b>卖出数量</b>
                            </label>
                            <select class="form-control" style="color: black !important; background-color: white !important;" id="sell_volume" name="num">
                                <option value="0">请选择售卖数额</option>
                                <option value="100">100</option>
                                <option value="250">250</option>
                                <option value="500">500</option>
                                <option value="1000">1000</option>
                                <option value="1500">1500</option>
                                <option value="2500">2500</option></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-8">
                            <label>
                                <b>收款方式</b>
                            </label>
                            <select required="" style="color: black !important; background-color: white !important;" class="form-control" name="bank_id" id="payment">
                                <option value="0">请选择收款方式</option>
								<volist name="user_bank['content']" id="vo">
									<option value="{$vo['id']}">{$vo['address']}</option>
								</volist>
							</select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label" for="color">二级密码</label>
                        <div class="col-md-6">
                            <input class="form-control" id="second_pass" name="twopassword" maxlength="20" type="password" placeholder="二级密码" required=""></div>
                    </div>
                    <input type="hidden" name="id" value="{$currency['id']}" class="has-value"></form>
            </div>
        </section>
    </fieldset>
    <footer class="panel-footer">
        <div class="row">
            <div class="col-sm-6 col-sm-offset-3">
                <label>
                    <input class="" type="checkbox" value="" required="">我已阅读并同意现金交易平台的所有条款。</label>
                <input class="mb-xs mt-xs mr-xs btn btn-primary sellbtn has-value" name="sellsubmit" type="button" onclick="sub()" value="售卖现金积分"></div>
        </div>
    </footer>
    <!-- start: sidebar-right -->
    <!-- start: sidebar-right -->
    <aside id="sidebar-right" class="sidebar-right">
        <div class="nano has-scrollbar">
            <div class="nano-content" tabindex="0" style="right: -17px;">
                <a href="#" class="mobile-close visible-xs">回到儀表板
                    <i class="fa fa-chevron-right"></i></a>
            </div>
            <div class="nano-pane" style="display: none; opacity: 1; visibility: visible;">
                <div class="nano-slider" style="height: 631px; transform: translate(0px, 0px);"></div>
            </div>
        </div>
    </aside>
    <!-- end: sidebar-right -->
    <!-- end: sidebar-right --></section>
		<script>
			function sub(){
				$.ajax({
					 type: "POST",
					 url: "{:U('Money/sellMoneySub')}",
					 data: $("#form").serialize(),
					 dataType: "json",
					 error: function(request) {
						layer.closeAll('loading');
						layer.msg("{$Think.lang.系统繁忙请稍后再试}");
					},
					beforeSend: function() {
						var index = layer.load(1, {
						  shade: [0.1,'#fff'] 
						});
					},
					 success: function(data){
							layer.closeAll('loading');
							layer.msg(data['info']);
							if(data['status']==true){
								<!-- setTimeout(function(){self.location.href="{:U('Money/sellMoney')}"},1000); -->
							}
						}
				});
			};
		</script>
<include file="Public:footer" />